﻿using System;
using System.Collections.Generic;
using System.Text;
using Xarmarin.GoldFinger.Data;

namespace Xarmarin.GoldFinger.Engine.Rand
{
    public class RandName
    {
        /// <summary>
        /// 随机姓名
        /// </summary>
        public static string Name
        {
            get
            {
                if (IsDouble)
                {
                    return GetSurname()+ GetDoubleOneName()+GetDoublieTwoName();
                }
                else
                {
                    return GetSurname()+GetSingleName();
                }
            }
        }

        public static bool IsDouble
        {
            get
            {
                return (new Random().Next(0, 100) % 2)==0;
            }
        }

        public static string GetSurname()
        {
            return RandCore.GetRandString(DictPool.SurnamePool);
        }
        public static string GetSingleName()
        {
            return RandCore.GetRandString(DictPool.SingleNamePool);
        }
        public static string GetDoubleOneName()
        {
            return RandCore.GetRandString(DictPool.DoubleOneNamePool);
        }
        public static string GetDoublieTwoName()
        {
            return RandCore.GetRandString(DictPool.DoubleTwoNamePool);
        }
    }
}
